package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;


/**
 * The persistent class for the SICKROOM_TABLE database table.
 * 
 */
@Entity
@Table(name="SICKROOM_TABLE")
@NamedQuery(name="SickroomTable.findAll", query="SELECT s FROM SickroomTable s")
public class SickroomTable implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private long sickroomid;

	private BigDecimal canlive;

	private BigDecimal haslive;

	private String office;

	private String sex2;

	private String sickroomname;

	private String sickroomstatus;

	//bi-directional many-to-one association to BedTable
	@OneToMany(mappedBy="sickroomTable")
	private List<BedTable> bedTables;

	//bi-directional many-to-one association to Floor
	@ManyToOne
	@JoinColumn(name="FLOOR_ID")
	private Floor floor;

	//bi-directional many-to-one association to SickroomtypeTable
	@ManyToOne
	@JoinColumn(name="TYPEID")
	private SickroomtypeTable sickroomtypeTable;

	public SickroomTable() {
	}

	public long getSickroomid() {
		return this.sickroomid;
	}

	public void setSickroomid(long sickroomid) {
		this.sickroomid = sickroomid;
	}

	public BigDecimal getCanlive() {
		return this.canlive;
	}

	public void setCanlive(BigDecimal canlive) {
		this.canlive = canlive;
	}

	public BigDecimal getHaslive() {
		return this.haslive;
	}

	public void setHaslive(BigDecimal haslive) {
		this.haslive = haslive;
	}

	public String getOffice() {
		return this.office;
	}

	public void setOffice(String office) {
		this.office = office;
	}

	public String getSex2() {
		return this.sex2;
	}

	public void setSex2(String sex2) {
		this.sex2 = sex2;
	}

	public String getSickroomname() {
		return this.sickroomname;
	}

	public void setSickroomname(String sickroomname) {
		this.sickroomname = sickroomname;
	}

	public String getSickroomstatus() {
		return this.sickroomstatus;
	}

	public void setSickroomstatus(String sickroomstatus) {
		this.sickroomstatus = sickroomstatus;
	}

	public List<BedTable> getBedTables() {
		return this.bedTables;
	}

	public void setBedTables(List<BedTable> bedTables) {
		this.bedTables = bedTables;
	}

	public BedTable addBedTable(BedTable bedTable) {
		getBedTables().add(bedTable);
		bedTable.setSickroomTable(this);

		return bedTable;
	}

	public BedTable removeBedTable(BedTable bedTable) {
		getBedTables().remove(bedTable);
		bedTable.setSickroomTable(null);

		return bedTable;
	}

	public Floor getFloor() {
		return this.floor;
	}

	public void setFloor(Floor floor) {
		this.floor = floor;
	}

	public SickroomtypeTable getSickroomtypeTable() {
		return this.sickroomtypeTable;
	}

	public void setSickroomtypeTable(SickroomtypeTable sickroomtypeTable) {
		this.sickroomtypeTable = sickroomtypeTable;
	}

}